#!/bin/bash

webResponse=$(curl -s -o /dev/null -w "%{http_code}" -X GET "https://www.mirror.aliyuncs.com")

if [ $webResponse !=  200 ] ; then
      echo "Unable to access external network, please check network configuration";
      exit;
fi

if [ ! -d /home/gonsin/venus/files/images ]; then
   mkdir /home/gonsin/venus/files/images
fi

cd ..
cp -r -f images /home/gonsin/venus/files/
cd /S12

docker-compose down --rmi all
docker-compose build
docker-compose up -d